<?php

header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");

include "../config.php";

$s_date = isset($_REQUEST['s_date']) ? $_REQUEST['s_date'] : '';
$e_date = isset($_REQUEST['e_date']) ? $_REQUEST['e_date'] : '';


$where = '';

/*if($s_date != ''){
	$where.=" and add_date = '$s_date'";
}
*/

$yestoday =  date("Y-m-d",strtotime("-1 day"));

$where.=" and add_date = '$yestoday'";


$sqlstr="select * from ".$table_Prefix."site_log  where 1  ".$where;

$res = mysql_query($sqlstr);

	
while($row = mysql_fetch_assoc($res)){
	
  $url = 'http://oa.enpingshi.com/api/send_admin_url.php?system='.$row['system'].'&tb_pre='.$row['tb_pre'].'&ip='.$row['ip'].'&pv='.$row['pv'].'&search='.$row['search'].'&message='.$row['message'].'&date='.$row['add_date'];

  _sock($url);
  			
}

?>
